package com.gs.process.core.utils;

import com.gs.process.core.token.TokenUtil;
import com.gs.process.core.user.ProcessUserService;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: Shuai Guo
 * @description:
 * @date: 2021/9/28
 * @version: 1.0
 */
public class HttpTokenUtil {

    private static ProcessUserService processUserService;

    public static void setProcessUserService(ProcessUserService processUserService){
        HttpTokenUtil.processUserService = processUserService;
    }

    public static Map<String, String> tokenHeaders() {
        //封装参数
        Map<String, String> headers = new HashMap<>();
        headers.put("token", TokenUtil.build(processUserService.get()));
        return headers;
    }
}
